document.write("<script language='javascript' src='resource/js/lib/jquery-1.7.2.min.js'></script>");


function claerDomContent(id){
	$(id).empty();
}

function verifyUsernamePassword(){
	
	var username=$.trim($("#userBean_username").val());
	var password=$.trim($("#userBean_password").val());
	
	$("#user_login_submit").attr("disabled","disabled");
	
	var verifyPattern=verifyUsernamePasswordPattern(username, password);
	
	if(verifyPattern == true){
		$('#remote_verify_loading').show();
		$('#verify_message').hide();
		return true;
	}else{
		$("#user_login_submit").removeAttr("disabled");
	}
	return false;
}

function verifyUsernamePasswordPattern(username, password){
	
	if(username == ''){
		claerDomContent('#verify_message');
		$('#verify_message').append("User name should not null.");
		$('#userBean_username').focus();
		return false;
	}
	
	if(password == ''){
		claerDomContent('#verify_message');
		$('#verify_message').append("Password should not null.");
		$('#userBean_password').focus();
		return false;
	}
	return true;
}